<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript" src=" ../plugins/vue/dist/vue.min.js"></script>
    <script type="text/javascript" src=" ../plugins/axios/dist/axios.min.js"></script>
    <script type="text/javascript" src="../js/common.js"></script>
    <div id="app">
        啦啦啦！！！！
    </div>
</head>
<body>
    <script type="text/javascript">

        new Vue({
            el:"#app",
            mounted(){
                let param = getRequest();
                this.$http.post("http://localhost/wechat/accessToken",param).then((res=>{
                    console.debug("============",res)
                    let{msg,result,success} = res.data;
                    if(success){
                        //跳转到绑定界面
                        location.href=result.url;
                    }
                    if(result.token && result.loginUser){
                        localStorage.setItem("token",result.token);
                        localStorage.setItem("loginUser",result.loginUser);
                        location.href="/index.html";
                    }
                }));
            }
        })
    </script>
</body>
</html>